/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

/* 天气容器 */
.weather-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* 头部样式 */
.weather-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.weather-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #333;
}

.search-box button {
    background: #4facfe;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: #00f2fe;
}

/* 主要内容样式 */
.weather-main {
    padding: 30px;
}

/* 当前天气样式 */
.current-weather {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.location {
    margin-bottom: 20px;
}

.location h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.location .date {
    color: #666;
    font-size: 1rem;
}

.weather-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.temperature {
    display: flex;
    align-items: center;
    gap: 20px;
}

.temp {
    font-size: 4rem;
    font-weight: 300;
    color: #333;
}

.weather-icon {
    font-size: 5rem;
    color: #ffb347;
}

.conditions {
    text-align: right;
}

.weather-desc {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 5px;
}

.feels-like {
    color: #999;
    font-size: 1rem;
}

.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.detail-item i {
    color: #4facfe;
    font-size: 1.2rem;
}

.detail-item span {
    color: #666;
    font-size: 1rem;
}

/* 预报样式 */
.forecast {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.forecast h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.forecast-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.forecast-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 温度监测样式 */
.temperature-monitoring {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.temperature-monitoring:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.temperature-monitoring h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
}

.temperature-monitoring h3 i {
    color: #4ecdc4;
    font-size: 1.6rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.temp-monitor-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.temp-record {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.temp-high,
.temp-low {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.2), rgba(255, 140, 0, 0.1));
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.temp-low {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2), rgba(135, 206, 250, 0.1));
    border: 1px solid rgba(135, 206, 250, 0.3);
}

.temp-high::before,
.temp-low::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.temp-high:hover::before,
.temp-low:hover::before {
    opacity: 1;
}

.temp-high:hover,
.temp-low:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.temp-high i {
    font-size: 2.5rem;
    color: #ff6b6b;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.temp-low i {
    font-size: 2.5rem;
    color: #4facfe;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.temp-high .label,
.temp-low .label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.temp-high .value,
.temp-low .value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-right: 10px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.temp-high:hover .value,
.temp-low:hover .value {
    transform: scale(1.05);
}

.temp-high .time,
.temp-low .time {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.temp-status {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-text {
    color: #4ecdc4;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.temp-graph {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    height: 320px;
    position: relative;
    overflow: hidden;
}

.temp-graph::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.01) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0.01) 75%, transparent 75%, transparent);
    background-size: 30px 30px;
    pointer-events: none;
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    0% { background-position: 0 0; }
    100% { background-position: 300px 300px; }
}

.temp-graph canvas {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    z-index: 1;
}

/* 图表自定义样式 */
.temp-graph canvas.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .temp-record {
        flex-direction: column;
        gap: 20px;
    }
    
    .temp-high,
    .temp-low {
        min-width: auto;
    }
    
    .temperature-monitoring {
        padding: 20px;
        margin: 20px 0;
    }
    
    .temperature-monitoring h3 {
        font-size: 1.5rem;
    }
    
    .temp-high .value,
    .temp-low .value {
        font-size: 2.2rem;
    }
    
    .temp-graph {
        height: 280px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .temperature-monitoring h3 {
        font-size: 1.3rem;
    }
    
    .temp-high,
    .temp-low {
        padding: 15px;
    }
    
    .temp-high i,
    .temp-low i {
        font-size: 2rem;
    }
    
    .temp-high .value,
    .temp-low .value {
        font-size: 1.8rem;
    }
    
    .temp-graph {
        height: 250px;
        padding: 15px;
    }
}

.forecast-card .day {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.forecast-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #4facfe;
}

.forecast-temp {
    color: #666;
    font-size: 0.9rem;
}

/* 小时预报样式 */
.hourly-forecast {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.hourly-forecast h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.hourly-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #4facfe #f1f1f1;
}

.hourly-scroll::-webkit-scrollbar {
    height: 6px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: #4facfe;
    border-radius: 10px;
}

.hourly-item {
    min-width: 80px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    flex-shrink: 0;
}

.hourly-item .hour {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.hourly-item i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffb347;
}

.hourly-temp {
    font-weight: bold;
    color: #333;
}

/* 底部样式 */
.weather-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .weather-header {
        padding: 20px;
    }

    .weather-header h1 {
        font-size: 2rem;
    }

    .weather-main {
        padding: 20px;
    }

    .temp {
        font-size: 3rem;
    }

    .weather-icon {
        font-size: 4rem;
    }

    .weather-info {
        justify-content: center;
        text-align: center;
    }

    .conditions {
        text-align: center;
        width: 100%;
    }

    .details {
        grid-template-columns: 1fr 1fr;
    }

    .forecast-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .temp {
        font-size: 2.5rem;
    }

    .weather-icon {
        font-size: 3rem;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .forecast-cards {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-weather,
.forecast,
.hourly-forecast {
    animation: fadeIn 0.5s ease-out;
}

.forecast-card,
.hourly-item {
    transition: all 0.3s ease;
}

.forecast-card:hover,
.hourly-item:hover {
    transform: translateY(-3px);
}

/* 天气图标颜色变化 */
.fa-sun {
    color: #ffb347;
}

.fa-cloud {
    color: #a8b8d8;
}

.fa-cloud-rain {
    color: #4facfe;
}

.fa-cloud-sun {
    color: #ffc107;
}

.fa-cloud-moon {
    color: #7b68ee;
}

.fa-tint {
    color: #00f2fe;
}

.fa-wind {
    color: #a8b8d8;
}

.fa-compress-alt,
.fa-eye {
    color: #4facfe;
}